home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / lib / os-probes / init / 10filesystems
Encoding:
Text File  |  2007-03-21  |  914 b   |  35 lines

  1. #!/bin/sh
  2. # Make sure filesystems are available.
  3. set +e    # ignore errors from modprobe
  4.  
  5. FILESYSTEMS='ext2 ext3 reiserfs xfs jfs msdos vfat ntfs minix hfs hfsplus qnx4 ufs fs-core fs-secondary'
  6.  
  7. if [ ! -e /var/lib/os-prober/modules ]; then
  8.     # Check for anna-install to make it easier to use os-prober outside
  9.     # d-i.
  10.     if type anna-install >/dev/null 2>&1 && [ -d /lib/debian-installer ]; then
  11.         for fs in $FILESYSTEMS; do
  12.             ANNA_QUIET=1 DEBIAN_FRONTEND=none \
  13.             log-output -t os-prober \
  14.                 anna-install "$fs-modules" || true
  15.         done
  16.         depmod -a >/dev/null 2>&1 || true
  17.     fi
  18.  
  19.     for fs in $FILESYSTEMS; do
  20.         case $fs in
  21.             fs-*)
  22.                 ;;
  23.             *)
  24.                 modprobe $fs 2>/dev/null | logger -t os-prober
  25.                 ;;
  26.         esac
  27.     done
  28.  
  29.     # We only want to keep this state inside d-i, so this is as good a
  30.     # check as any.
  31.     if type anna-install >/dev/null 2>&1 && [ -d /lib/debian-installer ]; then
  32.         touch /var/lib/os-prober/modules
  33.     fi
  34. fi
  35.